<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;  charset= <?php echo Yii::app()->charset; ?>" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<?php 
		Yii::app()->bootstrap->register();
		$cs=Yii::app()->clientScript;
		$cs->registerScriptFile(Yii::app()->baseUrl.'/js/emulatetab.joelpurra.js', CClientScript::POS_HEAD);
		$cs->registerScriptFile(Yii::app()->baseUrl.'/js/plusastab.joelpurra.js', CClientScript::POS_HEAD);
		$cs->registerScriptFile(Yii::app()->baseUrl.'/js/jquery/underscore.js', CClientScript::POS_HEAD);
	?>
</head>

<body data-plus-as-tab="true">

<div class="container" id="page">

	<div id="header">
		<div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
	</div><!-- header -->
	<?php $this->widget('bootstrap.widgets.TbNavbar', array(
		'type'=>'inverse', // null or 'inverse'
		'brand'=>'HORIZONTE',
		'brandUrl'=>'#',
		'collapse'=>true, // requires bootstrap-responsive.css
		'items'=>array(
			array(
				'class'=>'bootstrap.widgets.TbMenu',
				'items'=>array( 
					array('label'=>Yii::t('translations','legales'), 'items'=>array(											
											array('label'=>'Juicios',
											'items'=>array(array('label'=>'Juicios', 'url'=>array('/legales/juicio/admin')),
														   array('label'=>'Estimaciones', 'url'=>array('/legales/estimacion/admin')),
														   array('label'=>'Acuerdo de Pagos', 'url'=>array('/legales/acuerdoPagos/admin'))													       
											)),
											array('label'=>'Personas',
											    'items'=>array(array('label'=>'Personas', 'url'=>array('/legales/persona/admin')),
															   array('label'=>'Abogados', 'url'=>array('/legales/abogado/admin')),											              
											                   array('label'=>'Empresas', 'url'=>array('/legales/empresa/admin')),
											                   array('label'=>'Estudios', 'url'=>array('/legales/estudio/admin')),
											                   array('label'=>'Juzgados', 'url'=>array('/legales/juzgados/admin')),											                  											                   
											)),
											array('label'=>'Consultas',
											    'items'=>array(array('label'=>'Siniestros ART', 'url'=>array('/legales/siniestrosArt/admin')),
															   array('label'=>'Siniestros Generales', 'url'=>array('/legales/siniestro/admin')),
											                   array('label'=>'Polizas Art', 'url'=>array('/legales/empleadores/admin')),
											                   array('label'=>'Polizas Generales', 'url'=>array('/legales/poliza/admin')),
											                   array('label'=>'Asegurados', 'url'=>array('/legales/asegurado/admin')),
											                   array('label'=>'Tareas Terminadas', 'url'=>array('/legales/tarea/terminadas')),
											)),
											array('label'=>'Exportar',
											'items'=>array(array('label' => 'Exportar Csv', 'url' => array('/legales/export/exportProfesionalesART')),)),
											),'visible'=>Yii::app()->user->checkAccess('Legales')),//											
					array('label'=>Yii::t('translations','Comercial'), 'items'=>array(
											array('label'=>'Ventas',
											'items'=>array(array('label'=>'Accidentes Personales', 
												'items'=>array(array('label'=>'LLamado Telefonico','url'=>array('/CallCenter/ComAsegurados501/admin')),
															array('label'=>'Estadisticas', 'url'=>array('/CallCenter/ComAsegurados501/estadisticas')),
															array('label'=>'Certificados', 'url'=>array('/CallCenter/export/exportarArchivo')),
															array('label'=>'emision', 'url'=>array('/CallCenter/ComAsegurados501/emitidas')),
															array('label'=>'recepcion', 'url'=>array('/CallCenter/ComAsegurados501/confirmadas')),
											))),'visible'=>Yii::app()->user->checkAccess('CallCenter')))),
					array('label'=>Yii::t('translations','ART'), 'items'=>array(
											array('label'=>'Reclamos','items'=>array(array('label'=>'Reclamos','url'=>array('/ticket/ticket/admin')),array('label'=>'Tickets Vencidos','url'=>array('/ticket/ticket/exportarTicketsVencidos'))))),
											'visible'=>Yii::app()->user->checkAccess('Ticket')),
					array('label'=>'Cambiar Clave', 'url'=>array('/site/cambiarPassword'), 'visible'=>!Yii::app()->user->isGuest),
					array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
					array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
			)))));

	?><!-- mainmenu -->
	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> Horizonte Seguros.<br/>
		Todos los derechos reservados.<br/>
	</div><!-- footer -->

</div><!-- page -->
<script>
    $(document).ready(function(){
		JoelPurra.PlusAsTab.setOptions({
		// Use enter instead of plus
		// Number 13 found through demo at
		// http://api.jquery.com/event.which/
		key: 13 });
	})
</script>
</body>
</html>
